package work2345;

import java.util.Objects;

public class Book {
    private String name;
    private Double price;//价格
    private String publisher;//出版商
    private String author;//作者

    public Book(String name, double price, String publisher, String author) {
        this.name = name;
        this.price = price;
        this.publisher = publisher;
        this.author = author;
    }
    public Book() {

    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", price=" + price +
                ", publisher='" + publisher + '\'' +
                ", author='" + author + '\'' +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }
}
